<?php
/**
 * Created by PhpStorm.
 * User: qch
 * Date: 2015/6/10
 * Time: 16:59
 */

namespace J\Util;

use J\Event;


/**
 * 链式验证器
 */
class ValidEvent extends Event
{
    function getBehaviorByName($behavior, $arguments = null)
    {
        $behavior = array_isset($arguments, 'type', $behavior);
        if(is_string($behavior)) return new Validator($behavior, $arguments);

        return null;
    }
}